# import sounddevice as sd
# print(sd.query_devices())
# sd.default.device[0] = input()
# fs = 44100 # Hz
# length = 5 # s
# recording = sd.rec(frames=fs * length, samplerate=fs, blocking=True, channels=1)
# from scipy.io import wavfile
# wavfile.write('recording.wav', fs, recording)



import sounddevice as sd
print(sd.query_devices())

# sd.default.device[0] = input()
# print(sd.DeviceList())
in_stream = sd.InputStream(channels=1)
in_stream.start()
out_stream = sd.OutputStream(channels=1,device="CABLE Input (VB-Audio Virtual Cable), Windows WASAPI")
out_stream.start()
try:
    while True:
            (data,info )= in_stream.read(2048)
            # print(data)
            # print(info)
            out_stream.write(data)
   
except KeyboardInterrupt:
    pass
in_stream.stop()
out_stream.stop()
